package com.cyy.springbootinit.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cyy.springbootinit.model.dto.balanceWarning.BalanceWarningQueryRequest;
import com.cyy.springbootinit.model.entity.BalanceWarning;
import com.cyy.springbootinit.model.vo.BalanceWarningVO;

import javax.servlet.http.HttpServletRequest;

/**
 * 余额预警表服务
 *
 * @author 程序员cyy</a>
 * @from cyy</a>
 */
public interface BalanceWarningService extends IService<BalanceWarning> {

    /**
     * 校验数据
     *
     * @param balanceWarning
     * @param add 对创建的数据进行校验
     */
    void validBalanceWarning(BalanceWarning balanceWarning, boolean add);

    /**
     * 获取查询条件
     *
     * @param balanceWarningQueryRequest
     * @return
     */
    QueryWrapper<BalanceWarning> getQueryWrapper(BalanceWarningQueryRequest balanceWarningQueryRequest);
    
    /**
     * 获取余额预警表封装
     *
     * @param balanceWarning
     * @param request
     * @return
     */
    BalanceWarningVO getBalanceWarningVO(BalanceWarning balanceWarning, HttpServletRequest request);

    /**
     * 分页获取余额预警表封装
     *
     * @param balanceWarningPage
     * @param request
     * @return
     */
    Page<BalanceWarningVO> getBalanceWarningVOPage(Page<BalanceWarning> balanceWarningPage, HttpServletRequest request);
}
